package nix.spring.jdbc;

import java.util.List;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)// 自动创建容器
@ContextConfiguration("classpath:nix/spring/jdbc/applicationContext.xml")// 指定配置文件
public class Demo2 {

	@Resource(name="userDao2")
	private UserDao userDao;
	
	@Test
	public void fun6() {
		
		List<User> list = userDao.getAll();
		System.out.println(list);
	}
}
